enum Direction {
    Up = 'UP',
    Down = "DOWN",
    Left = 'LEFT',
    Right = 'RIGHT'
}

console.log(Direction.Up) //0
console.log(Direction[1]) //Down

const value = "UP"
if (value === Direction.Up) {
    console.log('go up!')
}
